package com.coc.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/test")
@ResponseBody
public class TestController {

    private static final Logger logger = LoggerFactory.getLogger(TestController.class);

    @RequestMapping(value = "/test1")
//    @PostMapping("/aop/test1")
    public Object test1(){
        logger.info("/aop/test1");
        if (1==1) {
//            int a = 1/0;
            throw new RuntimeException("sb");
        }
        logger.info("ok!!!!");
        return "ok";
    }
    @RequestMapping(value = "")
    public Object sayHello () {
        return "hello" ;
    }



}
